import { ref } from "vue";
import service from "../index.js";

const holidaysApi = {
    //查询所有审核通过的项目
    selectAllpass(pageNum,mname){
        const params = {
            pageNum: pageNum,
            mname: mname
        }
        return service.get('/admin/holidays/allpass', {params});
    },
    //查询所有待审核的项目
    selectAll(pageNum, mname){
        const params = {
            pageNum: pageNum,
            mname: mname
        }
        return service.get('/admin/holidays/examineall',{params})
    },
    updateState(state,hid){
        console.log(state,hid)
        return service.put(`/admin/holidays/${hid}/${state}`)
    },
    selectByHid(hid){
        return service.get(`/admin/holidays/${hid}`)
    },
    seelectAllEmp(mid){
        return service.get("/emp/holidays")
    },
    empInsert(holidays){
        return service.post("/emp/holidays",holidays)
    }
    
}
export default holidaysApi;